# //*[@id="mlayout"]/div[1]/div[2]/div/ul/li[2]/ul/li[1]/a
#  1.导包
import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from faker import Faker
fk = Faker('zh_CN')

# 2.打开浏览器（创建浏览器驱动对象）
path = r"D:\tools\python\chromedriver.exe"
ser = Service(executable_path=path)  # Chrome浏览器驱动服务对象
driver = webdriver.Chrome(service=ser)  # 打开Chrome浏览器
driver.maximize_window()
# 3.输入网址
driver.get("http://121.43.169.97:8081/common/member/login")
# 4.页面操作
# 登录
driver.find_element(By.ID, "keywords").send_keys("13810012011")
driver.find_element(By.ID, "password").send_keys("abc123")
driver.find_element(By.ID, "login-btn").click()
time.sleep(2)
driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/div/ul/li[2]/a').click()
time.sleep(1)
driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div[2]/div/div[1]/div[1]/div[2]/div[2]/a').click()

time.sleep(1)
driver.find_element(By.ID,'money').send_keys('20000')
time.sleep(1)
driver.find_element(By.XPATH,'//*[@id="tender_form"]/p[4]/input[2]').click()

